1. Field of the Invention
The present invention relates to color processing according to the viewing condition.
2. Description of the Related Art
In recent years, opportunities to print images obtained by digital cameras and scanners using printers are increasing. In general, the color space of image data output from such digital cameras and scanners is sRGB, AdobeRGB, or the like.
FIG. 1 is an xy chromaticity diagram showing the color gamuts of sRGB and AdobeRGB. A triangular region Rs shown in FIG. 1 is the color gamut of sRGB, a triangular region Ra including Rs is that of AdobeRGB, a horseshoe region Rv is that of a human visible range, and a region Rp is that of a representative printer. The sRGB color gamut Rs and printer color gamut Rp, or the AdobeRGB color gamut Ra and printer color gamut Rp are different from each other. For this reason, upon outputting sRGB image data to the printer, processing (gamut mapping) for associating sRGB color signal values to those of the printer so as to correct the color gamut difference is required.
FIG. 2 is a flowchart of general gamut mapping. Note that the following description will be given taking sRGB as an example of an input color space.
Jab values of a color appearance space corresponding to pixel values RGB of an sRGB image are calculated (S41). As the color appearance space, for example, CIELAB, CIECAM97s, CIECAM02, and the like are available. In the following description, assume that Jab values represent color values of CIECAM02.
The Jab values are mapped on the color gamut of an output device within the color appearance space (S42). J′a′b′ values after mapping are converted into device RGB values (R′G′B′ values) of the output device (S43). The gamut mapping implements calorimetric mapping that preserves values within an output gamut and maps values outside the output gamut on the boundary surfaces of the output gamut. Alternatively, perceptual mapping that maps on favorable colors while preserving tones may be executed.
According to the perceptual mapping, reproduction targets are set for specific colors such as memory colors including, e.g., flesh color, sky blue, and the like, and the gamut mapping is executed to convert the specific colors into target colors, thus realizing favorable color reproduction after mapping. As a technique for reproducing specific colors by target colors, for example, a technique disclosed in Japanese Patent Laid-Open No. 4-362869 is known. With this technique, mapping parameters are set in advance so that color differences between the specific colors and target colors fall within a certain range, and colors other than the specific colors are mapped on a specific color space to have smooth color variations. Also, Japanese Patent Laid-Open No. 6-121159 discloses a technique for mapping input color values on the output gamut while maintaining tones and correcting the specific colors to the target colors in association with the color values after mapping.
The technique of Japanese Patent Laid-Open No. 4-362869 calculates a maximum likelihood solution of masking coefficients which make the specific colors after color conversion match the target colors, and converts the pixel values of an image using the masking coefficients which meet the maximum likelihood solution into output device values.
On the other hand, the technique of Japanese Patent Laid-Open No. 6-121159 assures a region (correction range) that includes specific colors to map the specific colors, and linearly maps color values within the correction range upon reproducing the specific colors using the target colors, thus maintaining tonality between the specific colors and surrounding colors.
A technique disclosed in Japanese Patent Laid-Open No. 2004-112694 assures a region (correction range) that includes specific colors and target colors, and corrects surrounding colors in accordance with distances from the specific colors and target colors.
Meanwhile, output images of printers and the like are viewed in various locations. For this reason, a given image is often viewed under a pale fluorescent lamp of about 4200K which is popularly used at home, and is also often viewed under a red-yellow incandescent lamp of about 3000K. In such case, the viewer perceives quite different colors. Furthermore, the vision of an image differs depending on the intensity of illumination, colors around the image, the ratio between the adaptation luminance and background luminance upon viewing, and the like. In other words, even when the target colors are corrected to correct the colors of an image to be viewed as favorable colors under the light source of 4200K, if such image is viewed under the light source of 3000K, the target colors are not perceived as favorable colors. That is, unless suited target colors are set for respective viewing conditions, and an image undergoes color correction by switching the target colors for respective viewing conditions, the target colors are never perceived as favorable colors under respective conditions.
In this manner, the target colors must be switched for respective viewing conditions upon execution of gamut mapping. However, the aforementioned techniques do not consider viewing of an image under various viewing conditions.